Mesh Gradients in Compose 1.12 - #936
Conversation
* Created `MeshGradientSnippets.kt` featuring examples for basic, complex, and animated mesh gradients using `MeshGradientPainter`. * Included demonstrations of vertex positioning, color mapping, and custom control points for manipulating mesh curves.
|
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request introduces new Jetpack Compose snippets demonstrating the usage of MeshGradientPainter for basic, control-point-based, complex, and animated mesh gradients. It also updates the Compose BOM version to an alpha release (2026.05.01) and bumps the compileSdk version to 37 in the wearcompanion module. Regarding the feedback, an issue was identified in the MeshGradientAnimation snippet where the gradientPainter is remembered without any keys while capturing the animatedOffset state. This will prevent the painter from updating during the animation, keeping the gradient static. It is recommended to pass animatedOffset as a key to remember.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
kkuan2011
left a comment
There was a problem hiding this comment.
Changes look good, except one question:
| } | ||
|
|
||
| getByName("release") { | ||
| signingConfig = signingConfigs.getByName("debug") |
There was a problem hiding this comment.
Was this just for some local testing with a release build for performance? Don't think it's a major issue if we keep this, but maybe add a comment noting why this is here.
There was a problem hiding this comment.
its to be able to make a release version, its not an issue as its just a sample app that wont be released to google play
Adding snippets for https://developer.android.com/develop/ui/compose/graphics/draw/mesh-gradient